import sys

f = open(sys.argv[1])
for line in f:
    line = line.strip()
    parts = line.split()

    #if "-" in parts[1]:
    #    parts[1] = 0
    #sql = "insert into user_profile(id,year,gender,tweet_count) values(%s,%s,%s,%s);" % (parts[0], parts[1], parts[2], parts[3])
    #print sql

    sql = insert
    
    tag_ids = parts[4].split(";")
    for tag_id in tag_ids:
        sql = "insert into user_tags(id,tag_id) values(%s,%s); " % (parts[0],tag_id)
        print sql
    
